/**
 * Created by 付强 on 2017/3/30.
 */
import './comm/style/comm.scss';


window.myApp = angular.module('myApp', []);
window.myApp.run(function ($http) {
    // 网页可见区域高
    // var eventH = document.body.scrollHeight;
    // var scrollH = eventH > 678 ? eventH : 678;
    // var parentStyle = document.getElementsByClassName('parent')[0].style;
    // parentStyle.height = scrollH + 'px';
    // console.log('网页可见区域高：' + parentStyle.height);
    // console.log(layer);
});

window.myApp.controller('AppController', controllerFn);

function controllerFn($scope, $http) {
    var vm = this;
    $http.get('assets/css/style.css').then(function (res) {
        vm.styles = res.data;
    });

    // 复制到剪切板
    vm.copyStyle = function (styles) {
        var Url2 = document.getElementById("styles");
        Url2.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        // alert("已复制好，可贴粘。");
        layer.open({
            content: '已复制好，可贴粘。'
            ,skin: 'msg'
            ,time: 2 //2秒后自动关闭
        });
    }
}